"""
@Author  : 康帅
@Time    : 2021/3/15 10:08
@Function: __new__
"""


class Person:
    """ 人类 """

    __name = None

    def __new__(cls, names):
        if not cls.__name:
            Person.__name = super().__new__(cls)
        return cls.__name

    def __init__(self, names):
        self.__name = names

    def get_name(self):
        print("姓名：", self.__name)


if __name__ == '__main__':
    name = Person("康帅")
    name.get_name()
